CRPEJob::GetSelectedPrinter

Use CRPEJob::GetSelectedPrinter to determine which printer has been specified with the report. If a non-default printer is specified in the report, CRPEJob::GetSelectedPrinter retrieves information about that printer. This can be used, for example, to determine if the user has access to the printer specified in the report and to choose another printer if necessary.

Syntax
BOOL GetSelectedPrinter (
        CString &driverName,
        CString &printerName,
        CString &portName,
        DEVMODE **mode );
Parameters

driver
Name

Reference to the CString object containing the name of the printer driver for the currently selected printer in the report.

printer
Name

Reference to the CString object containing the name of the printer currently selected in the report.

portName

Reference to the CString object containing the name of the port to which the currently selected printer is attached (for example, "LPT1").

mode

Specifies a pointer to a pointer to the Windows API structure DEVMODE that contains information on the currently selected printer, if the CRPEJob::GetSelectedPrinter method is completed successfully. For more information on the DEVMODE structure, see DEVMODE.

Returns


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com